<template>
  <van-popup
      :value="visible"
      title=""
      position="center"
      lazy-render
  >
    <div class="load-contain">
      <img class="load" src="../assets/img/icon_wait.png" alt="">
    </div>
  </van-popup>
</template>

<script lang="ts">
    import {Component, Vue, Prop} from 'vue-property-decorator';

    @Component
    export default class CommitWait extends Vue {
        @Prop({
            type: Boolean,
            default: false
        }) visible: Boolean = false;
    }
</script>

<style scoped lang="scss">
  .load-contain {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 200px;
    height: 200px;
    perspective: initial;
  }

  .load {
    width: 75px;
    height: 75px;
    animation: loading 3s linear infinite;
    @keyframes loading {
      0% {
        transform: rotate(0deg);
      }
      100% {
        transform: rotate(360deg);
      }
    }
  }
</style>